Historical Intervals Discovery
Use the following URL to retrieve (discover) information of specific historical collection (measurement) intervals. The response contains a description of all available collection intervals. For each interval, the following attributes are shown:
| ■ | id: Interval index |
| ■ | start: Start time of the collection interval (local device time in RFC 3339 format) |
| ■ | end: End time of the collection interval (local device time in RFC 3339 format) |
URL
/api/v1/kpi/interval
HTTP Method
GET
Supported Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
?id=<Index> |
Number |
Returns a description of the specified interval number (<Index>). |
|
?id=last |
String |
Returns a description of the last (most recent) interval. |
|
?before=<Index> |
Number |
Returns the description of the intervals that occurred before the specified interval. |
|
?after=<Index> |
Number |
Returns the description of the intervals that occurred after the specified interval. |
|
?limit=<Count> |
Number |
Returns the description of the last specified number (count) of intervals. For example, to request the last 4 intervals, the Get must be set to "?limit=4". |
|
<Cursor Information> |
String |
Returns next (after) or previous (before) results (see Cursor-based Pagination for more information). |
HTTP Responses
| ■ | 200 OK |
| ■ | 204 No Content – no intervals are available |
Example 1
| ■ | Request: |
GET /api/v1/kpi/interval?id=2 HTTP/1.1 Host: 10.4.219.229
| ■ | Response: |
HTTP/1.1 200 OK
Content-Type: application/json
{
"intervals": [
{
"id": 2,
"start": "2020-07-14T10:06:00+01:00",
"end": "2020-07-14T10:07:00+01:00",
"url": "/api/v1/kpi/interval?id=2"
}
]
}